<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加商品页</title>
    <link rel="stylesheet" type="text/css" href="/static/css/table.css">
</head>
<body background="../static/14.jpg">
<p style="color: red;font-size: 24px;text-align: center">{{ get_flashed_messages()[0] }}</p>
<form method="post" enctype="multipart/form-data">
    <table class="add_table">
        <tr><th colspan="2" class="add_th">添 加 商 品</th></tr>

        <tr><td class="name">商品名称：</td>
            <td><input type="text" name="name" class="name_input"></td>
        </tr>

        <tr><td class="name">商品价格：</td>
            <td><input type="text" name="price" class="name_input"></td>
        </tr>

        <tr><td class="name">商品分类：</td>
            <td><select name="cate" class="select">
                    {% for cate in cates %}
                        <option value="{{ cate.id }}" class="option">{{ cate.name }}</option>
                    {% endfor %}
                </select>
            </td>
        </tr>

        <tr><td class="name">商品封面：</td>
            <td><input type="file" name="pic" class="name_input"></td>
        </tr>

        <tr><th colspan="2"><input type="submit" value="提交添加" id="id"></th></tr>
    </table>
</form>
</body>
</html>